<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/page/share/taglib.jsp" %>
<%@ include file="../share/taglib.jsp" %>
<%@ include file="../share/isReadOnly.inc" %>
<html>
<head>
<title>新闻列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/css/vip.css" type="text/css">
<script language="JavaScript">

	//到指定的分页页面
	function topage(page){
		var form = document.forms[1];
		form.page.value=page;
		form.submit();
	}

	function firm()
	{//利用对话框返回的值（true 或者 false）
		if(confirm("你确定要删除此新闻吗？")){
			event.returnValue = true;
		}else{
			event.returnValue = false;
		}
	}
	function queryBuilding() {
		document.forms[0].query.value = 'true';
		document.forms[0].submit();
	}
	function clearCondition() {
		document.forms[0].title.value = '';
		document.forms[0].status.value = '';
		document.forms[0].query.value = 'false';
		document.forms[0].submit();
	}
</script>
<SCRIPT language=JavaScript src="/js/FoshanRen.js"></SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000" marginwidth="0" marginheight="0">

<html:form action="/cms/news/list" method="post" onsubmit="return checkForm();">
<html:hidden property="query" value="true"/>
<html:hidden property="method" value="list"/>
<table width="98%" border="0" cellspacing="2" cellpadding="3" align="center">

    <tr bgcolor="f5f5f5"> 
      <td width="10%"><div align="right"><bean:message key="info.news.field.title"/>：</div></td>
      <td width="40%">
      	<html:text property="title" size="30"/>
      </td>
      
      <td width="15%"><div align="right"><bean:message key="info.news.field.status"/>：</div></td>
	  <td colspan="3">
	    <html:select property="status">
	      <html:option value="">-</html:option>
	      <html:option value="nonePublish"><bean:message key="info.news.status.nonePublish"/></html:option>
	      <html:option value="published"><bean:message key="info.news.status.published"/></html:option>
	      <html:option value="invalidate"><bean:message key="info.news.status.invalidate"/></html:option>
	    </html:select>
	  </td>
    </tr>
    
    <tr> 
      <td bgcolor="f5f5f5" colspan="6" align="center"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <td width="5%"></td>
            <td width="85%">
              <button type="button" onClick="javascript:queryBuilding();">&nbsp;<bean:message key="display.query"/>&nbsp;</button>&nbsp;&nbsp;
              <button type="button" onClick="javascript:clearCondition();">清除查询条件</button>
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</html:form>  
<html:form action="/cms/news/list" method="post">
<html:hidden property="page"/>
<html:hidden property="method" value="list"/>
  
  <table width="98%" border="0" cellspacing="1" cellpadding="2" align="center">
    <tr ><td colspan="12"  bgcolor="#ffbe26" align="right">
    	<%@ include file="/WEB-INF/page/share/fenye.jsp" %>
   </td></tr>
    <tr>
      <td width="10%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">代号</font></div></td>
      <td width="15%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">专题</font></div></td>
      <td width="20%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">标题</font></div></td>
      <td width="10%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">状态</font></div></td>
      <td width="10%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">点击次数</font></div></td>
      <td width="10%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">最后修改人</font></div></td>
      <td width="15%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">最后修改时间</font></div></td>
      <td width="5%" nowrap bgcolor="#ffbe26"> <div align="center"><font color="#000000">删除</font></div></td>
    </tr>
<!---------------------------LOOP START------------------------------>
<c:forEach items="${pageView.records}" var="entry">
    <tr>
      <td bgcolor="f5f5f5"><div align="center">${entry.newsId}</div></td>
      <td bgcolor="f5f5f5"><div align="center">${entry.feature.name}</div></td>
      <td bgcolor="f5f5f5"><div align="center"><a href="<html:rewrite action="/cms/news/newsManage"/>?method=editUI&newsId=${entry.newsId}&type=Base">
      ${entry.title}</a></div></td>
      <td bgcolor="f5f5f5"><div align="center"><bean:message key="info.news.status.${entry.status}"/></div></td>
      <td bgcolor="f5f5f5"><div align="center">${entry.click}</div></td>
      <td bgcolor="f5f5f5"><div align="center">${entry.createEmployee.username}</div></td>
      <td bgcolor="f5f5f5"><div align="center">${entry.lastUpdateTime}</div></td>
	  <td bgcolor="f5f5f5"> <div align="center"><a href="<html:rewrite action="/cms/news/newsManage"/>?method=delete&newsId=${entry.newsId}">
      <img src="/images/delete.gif" width="15" height="16" border="0" onClick=firm()></a></div></td>
	</tr>
</c:forEach>
    <!----------------------LOOP END------------------------------->
    <tr> 
      <td bgcolor="f5f5f5" colspan="12" align="center"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <td width="5%"></td>
              <td width="85%">
              <input name="AddDic" type="button" class="frm_btn" id="AddDic" onClick="javascript:window.location.href='<html:rewrite action="/cms/news/newsManage"/>?method=addUI'" value="添加新闻"> &nbsp;&nbsp;
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</html:form>
</body>
</html>